#!/usr/bin/env python
#coding=utf-8

from pyparsing import *
import pprint

LPAR, RPAR = map(Suppress, "()")

token = Word(alphanums + """-.;~@^\&|/_:%#*+=!<>,'"$`!?[]{}""")

sexp = Forward()
sexpList = Group(LPAR + ZeroOrMore(sexp) + RPAR)
sexp << ( token | sexpList )

def loads(s):
    return sexp.parseString(s).asList()[0]